<template>
    <div>
         <div class="magazine">
        <div class="maga-center">
            <div class="maga-box">
                <ul>
                    <li v-for="(item,index) in data" :key="index">
                        <div class="maga-top">
                           <div class="maga-logo">
                            <router-link  to="/detail">
                                <img src="../assets/img/magazine/head.png" alt="">
                            </router-link>
                        </div>
                        <div class="maga-title">
                            <h2>21客志</h2>
                            <span>2018.11.23</span>
                        </div>  
                        </div>
                        <div class="triangle"></div>
                       <div class="maga-main">
                        <div class="maga-left">
                            <h3>{{item.name}}</h3>
                            <span>
                                <router-link  to="/detail">阅读全文</router-link>
                            </span>
                        </div>
                        <div class="maga-right">
                            <router-link  to="/detail">
                                <img :src="`http://localhost:3000/${item.banner}`" alt="">
                            </router-link>
                        </div>
                       </div>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                data: '',
            }
        },
        mounted () {
           this.axios.get('/pro/log').then(res=>{
            console.log(res);
            this.data = res.data.data
           })
        },
        
    }
</script>

<style scoped src="../assets/css/magazine.css">
</style>
